package com.youlai.boot.modules.comment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.boot.modules.comment.model.Comment;
import com.youlai.boot.modules.comment.model.CommentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper extends BaseMapper<Comment> {
    Page<CommentVO> getCommentPage(
            Page<CommentVO> page,
            @Param("userId") Long userId,
            @Param("rootId") Long rootId,
            @Param("status") Integer status);

    List<CommentVO> getChildrenComments(@Param("parentId") Long parentId);
}